package com.atguigu.wulaoshi

object ControlAbstraction {
  def main(args: Array[String]): Unit = {
    //1.传值参数
    def f0(a:Int):Unit={
      println("a:"+a)
      println("a:"+a)
    }
    def f1():Int={
      println("f1调用")
      12
    }
    f0(f1())
    //2.传名参数,传递的不再是具体值,而是代码块
    //控制抽象:代码块传递给参数,
    def f2(a: =>Int):Unit={
      println(a)
      println(a)
    }
    f2(23)
    f2(f1())
  }

}
